<h3><?php echo $this->title?></h3>
<div class="upload-image">
<a href="/admin/subscriber/copy" style="font-weight: bold" class="btn">Copy danh sách</a>
<a href="/admin/subscriber/send-mail" style="font-weight: bold" class="btn">Gửi mail vào danh sách</a>
<a href="/admin/subscriber/list-newsletter" style="font-weight: bold" class="btn">Danh sách newsletter</a>
<div style="color:red;" id="edit_message"><?php echo $this->errMessage;?></div>
<?php if(is_array($this->subscribers)) {?>
    <table class="table table-bordered table-striped">
        <thead>
              <tr>
                <th>Tên</th>
                <th>Email</th>
                <th>Trạng thái</th>
                <th><a href="<?php echo $this->currentUrl?>&sort_by=last_update&sort_dir=<?php echo $this->sortDir^1?>">Ngày cập nhật<?php if($this->sortBylast_update) {?><i class="<?php echo $this->clzzSort?>"></i><?php }?></a></th>
                <th><a href="<?php echo $this->currentUrl?>&sort_by=dateline&sort_dir=<?php echo $this->sortDir^1?>">Ngày đăng ký<?php if($this->sortBydateline) {?><i class="<?php echo $this->clzzSort?>"></i><?php }?></a></th>
                <th>Thao tác</th>
              </tr>
        </thead>
        <tbody>
            <?php foreach($this->subscribers as $subsriber) :?>
             <tr>
                 <td style="width: 20%"><?php echo $subsriber['full_name']?></td>
                 <td><?php echo $subsriber['email']?></td>
                 <td style="text-align: center;">
                     <?php if($subsriber['active'] == 1) {?>
                         <i class="icon-ok"></i>
                     <?php } else {?>
                         <i class="icon-ban-circle"></i>
                     <?php }?>
                 </td>
                 <td><?php echo date('d/m/Y H:i:s', $subsriber['last_update'])?></td>
                 <td><?php echo date('d/m/Y H:i:s', $subsriber['dateline'])?></td>
                 <td>
                     <?php if($subsriber['active'] == 1) {?>
                         <a href="/admin/subscriber/unsubscribe/id/<?php echo $subsriber['id']?>/active/0">Hủy đăng ký</a>
                     <?php } else {?>
                         <a href="/admin/subscriber/unsubscribe/id/<?php echo $subsriber['id']?>/active/1">Hồi phục đăng ký</a>
                     <?php }?>
                 </td>
             </tr>
             <?php endforeach;?>
        </tbody>
      </table>
      <?php echo $this->paginationcontrol2($this->page, $this->totalItem, $this->numRowPerPage, 'pagination.phtml', $this->currentUrl);?>
</div>
<?php } else {?>
<div>Không có tin ai đăng ký theo dõi!</div>
<?php }?>
